package com.zzedu.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.google.common.collect.Lists;
import com.zzedu.domain.ZzThesaurusAttr;
import com.zzedu.dto.ZzThesaurusAttrDTO;

import java.util.List;

/**
 * 单词属性Service接口
 *
 * @author Mr.Wang
 * @date 2025-01-29
 */
public interface IZzThesaurusAttrService extends IService<ZzThesaurusAttr> {

    /**
     * 图片属性
     */
    List<String> imageAttrCodeList = Lists.newArrayList(
            "Noun_image", "Verb_image", "Adjective_image", "Adverb_image",
            "Pronoun_image", "Numeral_image", "Article_image", "Preposition_image", "Conjunction_image"
    );

    /**
     * 构造查询条件
     */
    public LambdaQueryWrapper<ZzThesaurusAttr> buildQuery(ZzThesaurusAttrDTO zzThesaurusAttrDTO);

    /**
     * 随机返回 单词ID中的某条属性 单词ID:属性 1:1
     * @param wordsId
     * @param attrCodeList
     * @return
     */
    List<ZzThesaurusAttr> getByWordIdAndAttrOne(List<Long> wordsId, List<String> attrCodeList);
}
